<template>
  <div id="layout">
    <!-- 嵌套路由的父组件 大的布局组件 -->
    <el-container>
      <el-header>
        <!-- 这里自己写组件，名字 logo 用户名 退出登录 -->
        <Header></Header>
      </el-header>
      <el-container>
        <el-aside width="200px">
            <Aside></Aside>
        </el-aside>
        <el-main>
          <!-- 嵌套路由 -->
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Aside from '../components/Aside.vue'
import Header from '../components/Header.vue'
export default {
    components: {
        Aside,
        Header
    }
};
</script>

<style>
.el-header {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
}

/* 覆盖element的样式 */
#layout .el-container {
  height: 100vh;
}
</style>